package com.jctrip.hotel.management.model.result;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
@Builder
@ApiModel(value = "用户列表接口-返回值")
public class GetUserListResult {
    @ApiModelProperty(value = "用户列表")
    private List<UserInfo> records;

    @ApiModelProperty(value = "用户总数")
    private Long total;

    @ApiModelProperty(value = "当前页码")
    private Long pageNum;

    @ApiModelProperty(value = "当前页面大小")
    private Long pageSize;

    @Data
    @Builder
    @ApiModel(value = "用户对象")
    public static class UserInfo{
        @ApiModelProperty(value = "主键id")
        private String id;

        @ApiModelProperty(value = "最后登录ip地址")
        private String lastLoginIp;

        @ApiModelProperty(value = "最后登录时间")
        @JsonFormat(pattern = "yyyy年MM月dd日 HH:mm:ss", timezone = "GMT+8")
        private Date lastLoginTime;

        @ApiModelProperty(value = "权限菜单")
        private List<String> permission;

        @ApiModelProperty(value = "手机")
        private String phone;

        @ApiModelProperty(value = "用户名")
        private String realName;

        @ApiModelProperty(value = "状态")
        private Integer status;

        @ApiModelProperty(value = "登录名")
        private String username;
    }
}
